<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class REXML::Light::Node - rexml: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link">Object
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-3C-3C">#&lt;&lt;</a>
    <li ><a href="#method-i-3D~">#=~</a>
    <li ><a href="#method-i-5B-5D">#[]</a>
    <li ><a href="#method-i-5B-5D-3D">#[]=</a>
    <li ><a href="#method-i-children">#children</a>
    <li ><a href="#method-i-each">#each</a>
    <li ><a href="#method-i-has_name-3F">#has_name?</a>
    <li ><a href="#method-i-local_name">#local_name</a>
    <li ><a href="#method-i-local_name-3D">#local_name=</a>
    <li ><a href="#method-i-name">#name</a>
    <li ><a href="#method-i-name-3D">#name=</a>
    <li ><a href="#method-i-namespace">#namespace</a>
    <li ><a href="#method-i-namespace-3D">#namespace=</a>
    <li ><a href="#method-i-namespace_of">#namespace_of</a>
    <li ><a href="#method-i-namesplit">#namesplit</a>
    <li ><a href="#method-i-node_type">#node_type</a>
    <li ><a href="#method-i-parent">#parent</a>
    <li ><a href="#method-i-parent-3D">#parent=</a>
    <li ><a href="#method-i-prefix">#prefix</a>
    <li ><a href="#method-i-prefix_of">#prefix_of</a>
    <li ><a href="#method-i-root">#root</a>
    <li ><a href="#method-i-size">#size</a>
    <li ><a href="#method-i-text-3D">#text=</a>
    <li ><a href="#method-i-to_s">#to_s</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-REXML::Light::Node">
    <h1 id="class-REXML::Light::Node" class="class">
      class REXML::Light::Node
    </h1>

    <section class="description">
    
<p>Represents a tagged XML element.  <a href="../Elements.html"><code>Elements</code></a> are characterized by having children, attributes, and names, and can themselves be children.</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">


      <section class="constants-list">
      <header>
      <h3>Constants</h3>
      </header>
      <dl>
          <dt id="NAMESPLIT">NAMESPLIT
          <dd>
          <dt id="PARENTS">PARENTS
          <dd>
        </dl>
        </section>



                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(node=nil)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Create a new element.</p>

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 13</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span> <span class="ruby-identifier">node</span>=<span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@node</span> = <span class="ruby-identifier">node</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
    <span class="ruby-identifier">node</span> = [ <span class="ruby-value">:text</span>, <span class="ruby-identifier">node</span> ]
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">node</span> = [ <span class="ruby-value">:document</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span> ]
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:start_element</span>
    <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] = <span class="ruby-value">:element</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:start_doctype</span>
    <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] = <span class="ruby-value">:doctype</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">:start_document</span>
    <span class="ruby-identifier">node</span>[<span class="ruby-value">0</span>] = <span class="ruby-value">:document</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-3C-3C" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">&lt;&lt;</span><span
                                class="method-args">(element)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Append a child to this element, optionally under a provided namespace. The namespace argument is ignored if the element argument is an <a href="../Element.html"><code>Element</code></a> object.  Otherwise, the element argument is a string, the namespace (if provided) is the namespace the element is created in.</p>

                              <div class="method-source-code" id="3C-3C-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 114</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">&lt;&lt;</span> <span class="ruby-identifier">element</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">node_type</span>() <span class="ruby-operator">==</span> <span class="ruby-value">:text</span>
    <span class="ruby-identifier">at</span>(<span class="ruby-value">-1</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">element</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">newnode</span> = <span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">element</span> )
    <span class="ruby-identifier">newnode</span>.<span class="ruby-identifier">parent</span> = <span class="ruby-keyword">self</span>
    <span class="ruby-keyword">self</span>.<span class="ruby-identifier">push</span>( <span class="ruby-identifier">newnode</span> )
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">at</span>(<span class="ruby-value">-1</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-3D~" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">=~</span><span
                                class="method-args">( path )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="3D~-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 90</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">=~</span>( <span class="ruby-identifier">path</span> )
  <span class="ruby-constant">XPath</span>.<span class="ruby-identifier">match</span>( <span class="ruby-keyword">self</span>, <span class="ruby-identifier">path</span> )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-5B-5D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">[]</span><span
                                class="method-args">( reference, ns=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="5B-5D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 78</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>( <span class="ruby-identifier">reference</span>, <span class="ruby-identifier">ns</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
    <span class="ruby-identifier">pfx</span> = <span class="ruby-string">&#39;&#39;</span>
    <span class="ruby-identifier">pfx</span> = <span class="ruby-node">&quot;#{prefix(ns)}:&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ns</span>
    <span class="ruby-identifier">at</span>(<span class="ruby-value">3</span>)[<span class="ruby-node">&quot;#{pfx}#{reference}&quot;</span>]
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Range</span>
    <span class="ruby-identifier">_old_get</span>( <span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">4</span><span class="ruby-operator">+</span><span class="ruby-identifier">reference</span>.<span class="ruby-identifier">begin</span>, <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">end</span>, <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">exclude_end?</span>) )
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">_old_get</span>( <span class="ruby-value">4</span><span class="ruby-operator">+</span><span class="ruby-identifier">reference</span> )
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-5B-5D-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">[]=</span><span
                                class="method-args">( reference, ns, value=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Doesn’t handle namespaces yet</p>

                              <div class="method-source-code" id="5B-5D-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 95</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]=</span>( <span class="ruby-identifier">reference</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
    <span class="ruby-identifier">value</span> = <span class="ruby-identifier">ns</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">value</span>
    <span class="ruby-identifier">at</span>( <span class="ruby-value">3</span> )[<span class="ruby-identifier">reference</span>] = <span class="ruby-identifier">value</span>
  <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Range</span>
    <span class="ruby-identifier">_old_put</span>( <span class="ruby-constant">Range</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">3</span><span class="ruby-operator">+</span><span class="ruby-identifier">reference</span>.<span class="ruby-identifier">begin</span>, <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">end</span>, <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">exclude_end?</span>), <span class="ruby-identifier">ns</span> )
  <span class="ruby-keyword">else</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>
      <span class="ruby-identifier">_old_put</span>( <span class="ruby-value">4</span><span class="ruby-operator">+</span><span class="ruby-identifier">reference</span>, <span class="ruby-identifier">ns</span>, <span class="ruby-identifier">value</span> )
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">_old_put</span>( <span class="ruby-value">4</span><span class="ruby-operator">+</span><span class="ruby-identifier">reference</span>, <span class="ruby-identifier">ns</span> )
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-children" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">children</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="children-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 143</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">children</span>
  <span class="ruby-keyword">self</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-each" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">each</span><span
                                class="method-args">() { |at(x+4)| ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="each-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 36</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">each</span>
  <span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span>( <span class="ruby-identifier">at</span>(<span class="ruby-identifier">x</span><span class="ruby-value">+4</span>) ) }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-has_name-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">has_name?</span><span
                                class="method-args">( name, namespace = &#39;&#39; )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="has_name-3F-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 139</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has_name?</span>( <span class="ruby-identifier">name</span>, <span class="ruby-identifier">namespace</span> = <span class="ruby-string">&#39;&#39;</span> )
  <span class="ruby-identifier">at</span>(<span class="ruby-value">3</span>) <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword">and</span> <span class="ruby-identifier">namespace</span>() <span class="ruby-operator">==</span> <span class="ruby-identifier">namespace</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local_name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local_name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local_name-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 54</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local_name</span>
  <span class="ruby-identifier">namesplit</span>
  <span class="ruby-ivar">@name</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-local_name-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">local_name=</span><span
                                class="method-args">( name_str )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="local_name-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 59</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">local_name=</span>( <span class="ruby-identifier">name_str</span> )
  <span class="ruby-identifier">_old_put</span>( <span class="ruby-value">1</span>, <span class="ruby-node">&quot;#@prefix:#{name_str}&quot;</span> )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">name</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="name-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 40</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">name</span>
  <span class="ruby-identifier">at</span>(<span class="ruby-value">2</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-name-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">name=</span><span
                                class="method-args">( name_str, ns=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="name-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">name=</span>( <span class="ruby-identifier">name_str</span>, <span class="ruby-identifier">ns</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">pfx</span> = <span class="ruby-string">&#39;&#39;</span>
  <span class="ruby-identifier">pfx</span> = <span class="ruby-node">&quot;#{prefix(ns)}:&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ns</span>
  <span class="ruby-identifier">_old_put</span>(<span class="ruby-value">2</span>, <span class="ruby-node">&quot;#{pfx}#{name_str}&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-namespace" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">namespace</span><span
                                class="method-args">( prefix=prefix() )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="namespace-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 67</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">namespace</span>( <span class="ruby-identifier">prefix</span>=<span class="ruby-identifier">prefix</span>() )
  <span class="ruby-identifier">namespace_of</span>( <span class="ruby-keyword">self</span>, <span class="ruby-identifier">prefix</span> )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-namespace-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">namespace=</span><span
                                class="method-args">( namespace )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="namespace-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 71</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">namespace=</span>( <span class="ruby-identifier">namespace</span> )
  <span class="ruby-ivar">@prefix</span> = <span class="ruby-identifier">prefix</span>( <span class="ruby-identifier">namespace</span> )
  <span class="ruby-identifier">pfx</span> = <span class="ruby-string">&#39;&#39;</span>
  <span class="ruby-identifier">pfx</span> = <span class="ruby-string">&quot;#@prefix:&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@prefix</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
  <span class="ruby-identifier">_old_put</span>(<span class="ruby-value">1</span>, <span class="ruby-node">&quot;#{pfx}#@name&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-node_type" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">node_type</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="node_type-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 125</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">node_type</span>
  <span class="ruby-identifier">_old_get</span>(<span class="ruby-value">0</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parent</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parent-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 147</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parent</span>
  <span class="ruby-identifier">at</span>(<span class="ruby-value">1</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-parent-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parent=</span><span
                                class="method-args">( node )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parent-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 50</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parent=</span>( <span class="ruby-identifier">node</span> )
  <span class="ruby-identifier">_old_put</span>(<span class="ruby-value">1</span>,<span class="ruby-identifier">node</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-prefix" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">prefix</span><span
                                class="method-args">( namespace=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="prefix-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">prefix</span>( <span class="ruby-identifier">namespace</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-identifier">prefix_of</span>( <span class="ruby-keyword">self</span>, <span class="ruby-identifier">namespace</span> )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-root" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">root</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="root-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 134</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">root</span>
  <span class="ruby-identifier">context</span> = <span class="ruby-keyword">self</span>
  <span class="ruby-identifier">context</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">at</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword">while</span> <span class="ruby-identifier">context</span>.<span class="ruby-identifier">at</span>(<span class="ruby-value">1</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-size" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">size</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="size-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 28</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">size</span>
  <span class="ruby-keyword">if</span> <span class="ruby-constant">PARENTS</span>.<span class="ruby-identifier">include?</span> <span class="ruby-ivar">@node</span>[<span class="ruby-value">0</span>]
    <span class="ruby-ivar">@node</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">size</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-value">0</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-text-3D" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">text=</span><span
                                class="method-args">( foo )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="text-3D-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 129</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">text=</span>( <span class="ruby-identifier">foo</span> )
  <span class="ruby-identifier">replace</span> = <span class="ruby-identifier">at</span>(<span class="ruby-value">4</span>).<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>)<span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">0</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">_old_put</span>(<span class="ruby-value">4</span>,<span class="ruby-identifier">replace</span>, <span class="ruby-identifier">normalizefoo</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_s" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_s</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_s-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 151</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_s</span>

<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-namespace_of" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">namespace_of</span><span
                                class="method-args">( node, prefix=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="namespace_of-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 164</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">namespace_of</span>( <span class="ruby-identifier">node</span>, <span class="ruby-identifier">prefix</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">prefix</span>
    <span class="ruby-identifier">name</span> = <span class="ruby-identifier">at</span>(<span class="ruby-value">2</span>)
    <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">NAMESPLIT</span>
    <span class="ruby-identifier">prefix</span> = <span class="ruby-node">$1</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">to_find</span> = <span class="ruby-string">&#39;xmlns&#39;</span>
  <span class="ruby-identifier">to_find</span> = <span class="ruby-node">&quot;xmlns:#{prefix}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">prefix</span>.<span class="ruby-identifier">nil?</span>
  <span class="ruby-identifier">ns</span> = <span class="ruby-identifier">at</span>(<span class="ruby-value">3</span>)[ <span class="ruby-identifier">to_find</span> ]
  <span class="ruby-identifier">ns</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">ns</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">namespace_of</span>( <span class="ruby-ivar">@node</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">prefix</span> )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-namesplit" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">namesplit</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="namesplit-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 157</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">namesplit</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@name</span>.<span class="ruby-identifier">defined?</span>
  <span class="ruby-identifier">at</span>(<span class="ruby-value">2</span>) <span class="ruby-operator">=~</span> <span class="ruby-constant">NAMESPLIT</span>
  <span class="ruby-ivar">@prefix</span> = <span class="ruby-string">&#39;&#39;</span> <span class="ruby-operator">||</span> <span class="ruby-node">$1</span>
  <span class="ruby-ivar">@name</span> = <span class="ruby-node">$2</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-prefix_of" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">prefix_of</span><span
                                class="method-args">( node, namespace=nil )</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="prefix_of-source">
            <pre><span class="ruby-comment"># File rexml-3.2.6/lib/rexml/light/node.rb, line 176</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">prefix_of</span>( <span class="ruby-identifier">node</span>, <span class="ruby-identifier">namespace</span>=<span class="ruby-keyword">nil</span> )
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">not</span> <span class="ruby-identifier">namespace</span>
    <span class="ruby-identifier">name</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">name</span>
    <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">NAMESPLIT</span>
    <span class="ruby-node">$1</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">ns</span> = <span class="ruby-identifier">at</span>(<span class="ruby-value">3</span>).<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">v</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">namespace</span> }
    <span class="ruby-identifier">ns</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">ns</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">prefix_of</span>( <span class="ruby-identifier">node</span>.<span class="ruby-identifier">parent</span>, <span class="ruby-identifier">namespace</span> )
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

